<?php
require('../conn.php');
require('../functions.php');
require('admin.php');
$page=$_GET['page'];
if(is_numeric($page)==false){
	$page=1;
}else{
	$page=$page+1;
}


?>

<?php include('head.php')?>    

    <div class="container-fluid">
        
        <div class="row-fluid">
		<?php
		include('left.php');
		?>
<div class="span9">
            <h1 class="page-title">积分兑换审核</h1>
		
<div class="well">
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane active in" id="home">
		<div class="well">
<div class="pull-right">
<button class="btn"><a href="txlist0.php">首页</a></button>
<button class="btn"><a href="?page=<?php echo $page?>">下一页</a></button>
</div>
 <form class="navbar-search pull-left" action="all_article.php" method="post">		
    <table class="table">
      <thead>
        <tr>
		  <th>提交时间</th>
          <th>任务名称</th>
		  <th>用户ID</th>
		  <th>任务单价</th>
		  <th>审核信息</th>
       
		  <th>审核操作</th>
        </tr>
      </thead>
      <tbody>
<?php
$row=$mysql->query("select * from `jifen2` where `state`=0 order by `id` desc");
$row_tx=page_array(50,$page,$row,0);
	  foreach($row_tx as $v_tx){
	  $time1=date("Y-m-d H:i",$v_tx['time']);
	  $day=date("Y-m-d",time());
	  $time=time();
	
	
 
	  
		
print <<<table
        <tr>
		  <td>{$time1}</td>
		  <td>{$v_tx['title']}</td>
		  <td>{$v_tx['uid']}</td>
		  <td>{$v_tx['money']}</td>
		  <td>{$v_tx['tasktj']}</td>
	
		  <td>
<a class="btn" href="?state1={$v_tx['id']}">合格</a>
			

		  </td>
        </tr>
table;

	  }
	  ?>  
      </tbody>
    </table>
</form>
</div>
      </div>
      <div class="tab-pane fade" id="profile">
      </div>
  </div>

</div>

        </div>
    </div>
    

    
    <footer>
        <hr>
        
        <p class="pull-right"><!--power by right--></p>
        
        
        <p><!--power by --></p>
    </footer>
    
<?php
    //任务审核通过

$state1=guolv($_GET['state1']);
if(is_numeric($state1)){
        $sql = "select `money` from `jifen2` where `id`='{$state1}'";
        $query = mysql_query($sql);
        $czmoney = mysql_result($query,0);
        $sql = "select `uid` from `jifen2` where `id`='{$state1}'";
        $query = mysql_query($sql);
        $czuid = mysql_result($query,0);
		$sql = "select `title` from `jifen2` where `id`='{$state1}'";
        $query = mysql_query($sql);
        $cztitle = mysql_result($query,0);
	$mysql->execute("update `jifen2` set `state`=1 where `id`='{$state1}'");
     
	echo "<script>alert('操作成功');location.href='edit_article4.php?id={$state1}'</script>";
	exit;
}
?>

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="lib/bootstrap/js/bootstrap.js"></script>
	
<!--<form class="contact_form" action="tasklist1.php" method="post">




</form>
-->
  </body>
</html>


